<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>
<%
	String str1 = (String)request.getAttribute("xmlString");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
  	<base href="<%=basePath%>"/>
    <title>企业统计</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<%=basePath+Util.SKIN%>/css/right.css">
	<script src="<%=basePath%>/js/table_span.js" type="text/javascript"></script>
	<script src="<%=basePath%>/js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="<%=basePath%>/js/oa.js" type="text/javascript"></script>
    <script src="<%=basePath%>/js/dbdialog/lhgdialog.js" type="text/javascript"></script>
	<script src="<%=basePath%>/js/checkbox1.js" type="text/javascript"></script>
	<script type="text/javascript" src="<%=basePath%>/js/selected.js"></script>
	<script type="text/javascript" src="/dySafety/js/My97DatePicker/WdatePicker.js" defer="defer"></script>
	<style type="text/css">
		.hideclass{display:none;}
	</style>
	<script type="text/javascript">
	$(document).ready(function() {
			_w_table_lefttitle_rowspan("#spdata", 2);
		
		});
	
		function funChange(v){	//	table or charts
	 		if(v=="1"){
				$("#hid").addClass("hideClass");
				$("#accidentTj").removeClass("hideClass");
			}else if(v=="2"){
	    		$("#accidentTj").addClass("hideClass");
	 			$("#hid").removeClass("hideClass");
				document.form1.strXml.value="<%=str1%>" ;
				document.form1.target="show";
				document.form1.submit();
			}
  		}
		
		function typeChange(radioVal){	
			document.form.submit();
		}	
	</script>
  </head>

	<body onload="">
		<div class="body-box">
			<div class="map">
				<div class="map_con">
					<b>当前位置：</b> 统计分析 &gt; 企业统计
				</div>
			</div>
			<div id="container">
				<div class="top_search">
					<fieldset>
						<form action="<%=basePath %>/tjfx/corp_getShudiTypeTj.action?upLevelName=${upLevelName }"  name="form" method="post">
							<s:radio  list="#{'5':'按企业类型小类','1':'属地','3':'行业'}"  name="tjType" value="%{tjType}" onclick="typeChange(this.value);" />
							<input type="hidden" name="typeMaxId" value="${typeMaxId}"/>
							<input type="hidden" name="totalCounts" id="totalCounts" value="${totalCounts}" />
							<input type="hidden" name="unitId"  value="${unitId}" />
							<input type="hidden" name="initType" value="${initType }" />
							<input type="hidden" name="tjTypeFlag2" value="${tjTypeFlag2 }" />
							<input type="hidden" name="tjTypeFlag3" value="${tjTypeFlag3 }" />
							<input type="hidden" name="tjTypeFlag" value="${tjTypeFlag }" />
						</form>
						<form name="form1" method="post" action="<%=basePath%>/FusionCharts/RunmaxChartReport1.jsp" target="show">
							<input type="radio" name="rad1" checked="checked" id="rad1" value="1" onclick="funChange(this.value);" />按表格展示&nbsp;
							<input type="radio" name="rad1" id="rad2" value="2" onclick="funChange(this.value);" />按图形展示
							<input type="hidden" name="caption" value="${chartbean.caption }"/>
							<input type="hidden" name="xAxisName" value="${chartbean.x_axisName }"/>
							<input type="hidden" name="yAxisName" value="${chartbean.y_axisName }"/>
							<input type="hidden" name="exportFileName" value="${chartbean.exportFileName }"/>
							<input type="hidden" id="strXml" name="strXml" />
							
						</form>
					</fieldset>
				</div>
				<table width="100%" height="100%" border=0>
					<tr>
						<td>
							<div id="accidentTj">
								<table width=100% height=20% cellspacing=0 cellpadding=0 border=0 style="display: block;">
									<tr>
										<td>
											<table id="spdata" cellspacing="0" align="left" width="99%" class="mytable">
												<tbody>
													<tr class="fixedHeaderTr">
														<th width="0" style="display: none" />
															<th width="10%" ></th>
															<th  width="10%" >${htmlTitle }</th>
															<th  width="10%">A级企业</th>
															<th  width="10%">B级企业</th>
															<th  width="10%" >C级企业</th>
															<th  width="10%">D级企业</th>
															<th  width="10%" >未评级企业</th>
															<th  width="10%" >合计</th>
															<th  width="10%" >百分比</th>
															<th  width="0" style="display: none" ></th>
													</tr>
													<s:if test="%{htmlList.size>0}">
														<s:iterator value="htmlList" id="obj" status="x">
															<tr>
																<td style="display: none" />
																	<td style="font-size: 17px;" align="center" >${upLevelName}</td>
																	<td  >
																		${obj[0]} </td>
																	<td   width="208"  >
																		&nbsp;
																		<a target="_blank"  href="<%=basePath%>/tjfx/corp_getTjCorpList.action?corpGrade=A&tjTypeFlag2=${tjTypeFlag2 }:${obj[1] }&tjTypeFlag=${tjTypeFlag }:${obj[1] }&tjType=${tjType }&tjTypeFlag3=${tjTypeFlag3 }">
																		${obj[2]}</a>
																	</td>
																	<td   width="208"  >
																		&nbsp;
																		<a target="_blank"  href="<%=basePath%>/tjfx/corp_getTjCorpList.action?corpGrade=B&tjTypeFlag2=${tjTypeFlag2 }:${obj[1] }&tjTypeFlag=${tjTypeFlag }:${obj[1] }&tjType=${tjType }&tjTypeFlag3=${tjTypeFlag3 }">${obj[3]}</a>
																	</td>
																	<td   width="208"  >
																		&nbsp;
																		<a target="_blank"  href="<%=basePath%>/tjfx/corp_getTjCorpList.action?corpGrade=C&tjTypeFlag2=${tjTypeFlag2 }:${obj[1] }&tjTypeFlag=${tjTypeFlag }:${obj[1] }&tjType=${tjType }&tjTypeFlag3=${tjTypeFlag3 }">${obj[4]}</a>
																	</td>
																	<td   width="208"  >
																		&nbsp;
																		<a target="_blank"  href="<%=basePath%>/tjfx/corp_getTjCorpList.action?corpGrade=D&tjTypeFlag2=${tjTypeFlag2 }:${obj[1] }&tjTypeFlag=${tjTypeFlag }:${obj[1] }&tjType=${tjType }&tjTypeFlag3=${tjTypeFlag3 }">${obj[5]}</a>
																	</td>
																	<td   width="208"  >
																		&nbsp;
																		<a target="_blank"  href="<%=basePath%>/tjfx/corp_getTjCorpList.action?corpGrade=null&tjTypeFlag2=${tjTypeFlag2 }:${obj[1] }&tjTypeFlag=${tjTypeFlag }:${obj[1] }&tjType=${tjType }&tjTypeFlag3=${tjTypeFlag3 }">${obj[6]}</a>
																	</td>
																	<td   width="208"  >
																		&nbsp;
																		<a target="_blank"  href="<%=basePath%>/tjfx/corp_getTjCorpList.action?tjTypeFlag2=${tjTypeFlag2 }:${obj[1] }&tjTypeFlag=${tjTypeFlag }:${obj[1] }&tjType=${tjType }&tjTypeFlag3=${tjTypeFlag3 }">${obj[7]}</a>
																	</td>
																	<td   width="208"  >&nbsp;${obj[8]}
																	</td>
																	<td  width="0"style="display: none">
																	</td>
															</tr>
														</s:iterator>
														
														<s:iterator value="sumList" id="sum" status="x">
														<tr align="left">
															<td colspan="2" align="center">合计</td>
															<td >&nbsp;${sum[2]}</td>
														<td>&nbsp;${sum[3]}</td>
														<td>&nbsp;${sum[4]}</td>
														<td>&nbsp;${sum[5]}</td>
														<td>&nbsp;${sum[6]}</td>
														<td>&nbsp;${sum[7]}</td>
														<td>&nbsp;${sum[8]}</td>
														</tr>
													</s:iterator>
														<tr>
						<td colspan="6">
							<form target="_blank" method="post" action="<%=basePath%>/tjfx/corp_getShudiTypeTj.action?initType=3&exportExcelFlag=1&unitId=${unitId }&tjType=${tjType }&totalCounts=${totalCounts }&search=1">
								<input type="button" class="link_input" value="返 回" onClick="location.href='<%=basePath %>/tjfx/corp_getTypeTj.action?initType=3'" />
								<input type="submit" value="导出Excel" class="link_input">
								<input type="hidden" name="upLevelName" value="${upLevelName }" />
							</form>
						</td>
					</tr>
													</s:if>
													<s:else>
														<tr>
															<td class="s01" height="34" width="0" rowspan="1" colspan="1" />
																<td class="s41" height="34" width="219" rowspan="1" colspan="9" style="text-align: center;">
																	没有数据
																</td>
																<td class="s00" height="34" width="2" rowspan="1" colspan="1">
																</td>
														</tr>
													</s:else>
												</tbody>
											</table>
										</td>
									</tr>
								</table>
							</div>
							<iframe id="hid" src="" name="show" marginWidth=0 marginHeight=0 frameBorder=0 width=100% scrolling=no height=25 onload="this.height=this.contentWindow.document.body.scrollHeight"></iframe>
						</td>
					</tr>
				</table>
			</div>
	</body>
</html>
